<template>
  <div id="app">
    <div class="sidebar">
      <mycard></mycard>
    </div>
    <div class="main">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import mycard from "./components/mycard/mycard";
import { mapActions } from "vuex";
export default {
  data() {
    return {
      meeting: {
        receiveId: "33ebc460f9b24c5aac8e2d82081e49c2",
        subject: "测试会议",
      },
      meetingMany: {
        attendeeIds: "0ddfb280f73b494ba48eb072ddb54b70,1",
        endTime: "2021-9-15 18:00:00",
        startTime: "2021-9-15 17:00:00",
        subject: "测试多人会议",
      },
    };
  },
  components: {
    mycard,
  },
  created() {
    sessionStorage.setItem(
      "token",
      "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uSWQiOiIyNjkxOTQzMC1hNDllLTRiMzEtYWRjZS0wMWYyMDVhOGVlMTgiLCJleHAiOjE2MzQ3ODU4ODMsInVzZXJuYW1lIjoiYWRtaW4ifQ.XcimxKy5HvIfIbBAImuv-JAJosiEcY7EvXtxUu6lNvI"
    );
    this.$store.dispatch("initData");
    //  this.sendVideo();
  },
  methods: {
    // 发视频
    sendVideo() {
      this.$api
        .meetingStart(this.meeting)
        .then((res) => {
          window.open(
            "iwl.conf://" + res.data.data.hostUrl.split("//")[1],
            "_self"
          );
        })
        .catch((err) => {
          console.log("失败了", err);
        });
    },
  },
};
</script>

<style lang="stylus" scoped>
@import url('./static/css/reset.css');

#app {
  display: flex;
  border-radius: 50px;
  margin: 20px auto;
  width: 1110px;
  height: 600px;
  background-color: #fff;

  .sidebar {
    width: 60px;
    height: 600px;
    background: #2b2c2f;
  }

  .main {
    flex: 1;
    height: 600px;
    background: #F3F3F3;
  }
}
</style>
